package com.lxs.mall.mallthird.controller;

import com.lxs.common.utils.R;
import com.lxs.mall.mallthird.utils.SmsComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SmsController {
    @Autowired
    private SmsComponent smsComponent;

    @GetMapping("/sms/sendCode")
    public R sendCode( String phone,String code){
        smsComponent.sendSmsCode(phone, code);
        return R.ok();
    }
}
